{{ partial "header.html" . }}
{{ $baseurl := .Site.BaseURL | sanitizeurl }}
<article class="p-article">
  <header>
    <h1>{{ .Title }}</h1>
    <div>
      <div class="c-time">
        Posted on
        <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
          {{ .Date.Format "Jan 2, 2006" }}
        </time>
      </div>
      {{ range .Params.tags }}
      <a href="{{ $baseurl }}/tags/{{ . | urlize }}" class="c-tag">{{ . }}</a>
      {{ end }}
    </div>
  </header>
  {{ with .Params.thumbnail }}
    <img src="{{ . }}" alt="thumbnail" class="p-article__thumbnail">
  {{ end }}
  <section id="js-article" class="p-article__body">
    {{ .Content }}
  </section>
  <footer>
    {{ with .Site.Params.disqus }}
    <div id="disqus_thread"></div>
    <script>
    var disqus_shortname = '{{ . }}';
    (function() {
    var d = document, s = d.createElement('script');
    s.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
    s.setAttribute('data-timestamp', +new Date());
    (d.head || d.body).appendChild(s);
    })();
    </script>
    <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
    {{ end }}
    <nav class="p-pagination c-pagination">
      <div class="c-pagination__ctrl">
        <div class="c-pagination__newer">
          {{ if .NextPage }}
          <a href="{{ .NextPage.Permalink }}">Newer</a>
          {{ else }}
          {{ end }}
        </div>
        <div class="c-pagination__older">
          {{ if .PrevPage }}
          <a href="{{ .PrevPage.Permalink }}">Older</a>
          {{ else }}
          {{ end }}
        </div>
      </div>
    </nav>
    {{ partial "related.html" . }}
    {{ partial "siteinfo.html" . }}
  </footer>
</article>
{{ partial "footer.html" . }}
